package br.com.alinesoftware.app.entity;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.FetchType;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;

import org.hibernate.annotations.ForeignKey;

import com.powerlogic.jcompany.domain.validation.PlcUnifiedValidation;

@MappedSuperclass
@PlcUnifiedValidation
public abstract class GarcomFreeLancer extends Pessoa {

	private static final long serialVersionUID = -7214902141246142913L;

	@OneToMany(targetEntity = br.com.alinesoftware.app.entity.ContratoGarcomEntity.class, fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "garcomFreeLancer")
	@ForeignKey(name = "FK_CONTRGARC_GARCOMFL")
	private List<ContratoGarcom> contratoGarcom;

	public List<ContratoGarcom> getContratoGarcom() {
		return contratoGarcom;
	}

	public void setContratoGarcom(List<ContratoGarcom> contratoGarcom) {
		this.contratoGarcom = contratoGarcom;
	}

}
